package com.sunwayhorizo.health.business.registries.threelevels.query;

import java.util.List;

import javax.ejb.Local;

import com.sunwayhorizo.health.hl7.common.Hl7Exception;
import com.sunwayhorizo.health.hl7.rim.ActParticipation;
import com.sunwayhorizo.health.hl7.rim.Role;

@Local
public interface ThreeLevelQueryLocal
{

    /**
     * 查询参与动作的所有participation 查询条件根为角色id，typeCode拿到动作id
     * @param roleId 角色id
     * @param typeCode participation typeCode
     * @return List<ActParticipation>
     * @throws Hl7Exception
     */
    public List<ActParticipation> findActPrtcptnsByAct(Long roleId,String typeCode) throws Hl7Exception;
    
    /**
     * 查询角色参与动作的participation
     * @param roleId 角色id
     * @param typeCode participation typeCode
     * @return List<ActParticipation>
     * @throws Hl7Exception
     */
    public List<ActParticipation> findActPrtcptnsByRole(Long roleId,String typeCode) throws Hl7Exception;
    
    /**
     * 查询三级医生所在的ActParticipation
     * @param roleId
     * @param typeCode
     * @return
     * @throws Hl7Exception
     */
    public ActParticipation findActPrtcptnsByRoleId(Long roleId,String typeCode) throws Hl7Exception;
    
    /**
     * 根据Role查询动作参与的所有的Participation
     * @param role 参与动作的role
     * @return List<ActParticipation>
     * @throws Hl7Exception
     */
    public List<ActParticipation> findThreeLevelListByRole(Role role) throws Hl7Exception;
    
    /**
     * 根据工作组实体id查询所有的三级医生角色
     * @param workgroupId 工作组 RIM实体id
     * @return List<Role>
     * @throws Hl7Exception
     */
    public  List<Role> findThreeLevelListByWorkGroupId(String workgroupId) throws Hl7Exception;
}
